#!/bin/sh
currentdate=$(date +%m%d%H%M%S)
ESSID=$(iwconfig wlan1 2>/dev/null |grep -oP '(?<=ESSID:").*?(?=")'| grep ^"hotspot" | grep -oP '\d+')
cd /userdata/workdir/bag/
rosbag record --lz4 -O ${ESSID}_${currentdate}_test$1.bag /any_path /cmd_vel  /ocupancy_grid_map_demo/global_grid_map /ocupancy_grid_map_demo/local_grid_map  /move_base/local_costmap/costmap /move_base/global_costmap/costmap /tf /tf_static /www_scan /chassis/encoder /chassis/rawdata /imu /deptrum/rgb/image_raw/compressed /odom /sumec_odom /vio_odom /wheel_odom /multisensor_fusion_node/chassis_pose_visual /aruco_single/single_pose